<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /**
     * 1、number
     * 2、string
     * 3、boolean
     * 4、undefined
     * 5、object
     *
     * 只声明变量，不赋值的情况 undefined
     * null的类型默认为object
     */
    let a;
    document.write("<h3>检测到变量a类型为：", typeof a, "</h3>");// 结果为 undefined

    let obj = {
        name: "zhangsan",
        age:28,
        address: null
    };
    document.write("<h3>检测到变量obj.address的类型为：", typeof obj.address, "</h3>");// 结果为 object

    /**
     * null的类型为object
     */
    let bb = null;
    document.write("<h3>检测到变量bb的类型为：", typeof bb, "</h3>");// 结果为 object

</script>
</body>
</html>